JP-2008-76191A discloses an off-failure diagnosis device of an oxygen sensor as an example of a gas-sensor control device.
The off-failure diagnosis device executes an off-failure diagnosis of the oxygen sensor generating an electromotive force according to a concentration of an oxygen in an exhaust gas. The off-failure diagnosis device includes an impedance detection circuit and an output-voltage detection circuit. The impedance detection circuit detects an impedance of the oxygen sensor in a case where a voltage is applied to the oxygen sensor. The output-voltage detection circuit detects an output voltage of the oxygen sensor. Further, the off-failure diagnosis device includes an off-failure determination portion. The off-failure determination portion compares a difference between the output voltage before the voltage is applied to the oxygen sensor and the output voltage after the voltage is applied to the oxygen sensor with a predetermined value, and determines an off failure of the oxygen sensor and an off failure of the impedance detection circuit.
When the impedance is detected, the off-failure diagnosis device determines whether the difference is greater than the predetermined value. When the off-failure diagnosis device determines that the difference is greater than the predetermined value, the off-failure diagnosis device compares the impedance with the predetermined value. When the impedance is greater than the predetermined value, the off-failure diagnosis device determines that the output voltage of the oxygen sensor is not generated. Therefore, the off-failure diagnosis device determines a second element has the off failure and the impedance detection circuit has the off failure.
However, since the off-failure diagnosis device uses the difference to determine the off failure of the second element, it is necessary to detect the output voltage before the voltage is applied to the oxygen sensor and the output voltage after the voltage is applied to the oxygen sensor. When the off-failure diagnosis device determines whether the first element turned on when being applied by the voltage has the off failure, the off-failure diagnosis device uses at least the output voltage before the voltage is applied to the oxygen sensor. The first element can be referred to as a sweep circuit. The second element can be referred to as a return sweep circuit.
When the off-failure diagnosis device determines whether the sweep circuit and the return sweep circuit have the off failure, it is necessary that the off-failure diagnosis device acquires the output voltage before the voltage is applied to the oxygen sensor and the output voltage after the voltage is applied to the oxygen sensor. In other words, the off-failure diagnosis device acquires the output voltage twice to determine the off failure. Therefore, in the off-failure diagnosis device, a control of a timing that the voltages are acquired becomes complicated.